3.1.71 \(\int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx\) [71]

3.1.71.1 Optimal result
3.1.71.2 Mathematica [A] (verified)
3.1.71.3 Rubi [A] (verified)
3.1.71.4 Maple [A] (verified)
3.1.71.5 Fricas [F]
3.1.71.6 Sympy [F]
3.1.71.7 Maxima [B] (verification not implemented)
3.1.71.8 Giac [F]
3.1.71.9 Mupad [F(-1)]

3.1.71.1 Optimal result

Integrand size = 17, antiderivative size = 112 \[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=a b d x+b^2 d x \text {arctanh}(c x)+\frac {d (1+c x)^2 (a+b \text {arctanh}(c x))^2}{2 c}-\frac {2 b d (a+b \text {arctanh}(c x)) \log \left (\frac {2}{1-c x}\right )}{c}+\frac {b^2 d \log \left (1-c^2 x^2\right )}{2 c}-\frac {b^2 d \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c} \]

output
a*b*d*x+b^2*d*x*arctanh(c*x)+1/2*d*(c*x+1)^2*(a+b*arctanh(c*x))^2/c-2*b*d* 
(a+b*arctanh(c*x))*ln(2/(-c*x+1))/c+1/2*b^2*d*ln(-c^2*x^2+1)/c-b^2*d*polyl 
og(2,1-2/(-c*x+1))/c
 
3.1.71.2 Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.39 \[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=\frac {d \left (2 a^2 c x+2 a b c x+a^2 c^2 x^2+b^2 \left (-3+2 c x+c^2 x^2\right ) \text {arctanh}(c x)^2+2 b \text {arctanh}(c x) \left (c x (2 a+b+a c x)-2 b \log \left (1+e^{-2 \text {arctanh}(c x)}\right )\right )+a b \log (1-c x)-a b \log (1+c x)+2 a b \log \left (1-c^2 x^2\right )+b^2 \log \left (1-c^2 x^2\right )+2 b^2 \operatorname {PolyLog}\left (2,-e^{-2 \text {arctanh}(c x)}\right )\right )}{2 c} \]

input
Integrate[(d + c*d*x)*(a + b*ArcTanh[c*x])^2,x]
 
output
(d*(2*a^2*c*x + 2*a*b*c*x + a^2*c^2*x^2 + b^2*(-3 + 2*c*x + c^2*x^2)*ArcTa 
nh[c*x]^2 + 2*b*ArcTanh[c*x]*(c*x*(2*a + b + a*c*x) - 2*b*Log[1 + E^(-2*Ar 
cTanh[c*x])]) + a*b*Log[1 - c*x] - a*b*Log[1 + c*x] + 2*a*b*Log[1 - c^2*x^ 
2] + b^2*Log[1 - c^2*x^2] + 2*b^2*PolyLog[2, -E^(-2*ArcTanh[c*x])]))/(2*c)
 
3.1.71.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.09, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {6480, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c d x+d) (a+b \text {arctanh}(c x))^2 \, dx\)

\(\Big \downarrow \) 6480

\(\displaystyle \frac {d (c x+1)^2 (a+b \text {arctanh}(c x))^2}{2 c}-\frac {b \int \left (\frac {2 d^2 (c x+1) (a+b \text {arctanh}(c x))}{1-c^2 x^2}-d^2 (a+b \text {arctanh}(c x))\right )dx}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {d (c x+1)^2 (a+b \text {arctanh}(c x))^2}{2 c}-\frac {b \left (\frac {2 d^2 \log \left (\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))}{c}-a d^2 x-b d^2 x \text {arctanh}(c x)-\frac {b d^2 \log \left (1-c^2 x^2\right )}{2 c}+\frac {b d^2 \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c}\right )}{d}\)

input
Int[(d + c*d*x)*(a + b*ArcTanh[c*x])^2,x]
 
output
(d*(1 + c*x)^2*(a + b*ArcTanh[c*x])^2)/(2*c) - (b*(-(a*d^2*x) - b*d^2*x*Ar 
cTanh[c*x] + (2*d^2*(a + b*ArcTanh[c*x])*Log[2/(1 - c*x)])/c - (b*d^2*Log[ 
1 - c^2*x^2])/(2*c) + (b*d^2*PolyLog[2, 1 - 2/(1 - c*x)])/c))/d
 

3.1.71.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 6480
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_S 
ymbol] :> Simp[(d + e*x)^(q + 1)*((a + b*ArcTanh[c*x])^p/(e*(q + 1))), x] - 
 Simp[b*c*(p/(e*(q + 1)))   Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p - 1 
), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] 
 && IGtQ[p, 1] && IntegerQ[q] && NeQ[q, -1]
 
3.1.71.4 Maple [A] (verified)

Time = 0.43 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.88

method result size
parts \(a^{2} d \left (\frac {1}{2} c \,x^{2}+x \right )+\frac {b^{2} d \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )^{2}}{2}+c x \operatorname {arctanh}\left (c x \right )^{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {3 \,\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )}{2}+\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )}{2}+\frac {\left (\ln \left (c x +1\right )-\ln \left (\frac {c x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c x}{2}+\frac {1}{2}\right )}{4}-\operatorname {dilog}\left (\frac {c x}{2}+\frac {1}{2}\right )-\frac {\ln \left (c x +1\right )^{2}}{8}+\frac {\ln \left (c x -1\right )}{2}+\frac {\ln \left (c x +1\right )}{2}-\frac {3 \ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{4}+\frac {3 \ln \left (c x -1\right )^{2}}{8}\right )}{c}+\frac {2 a b d \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )}{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {c x}{2}+\frac {3 \ln \left (c x -1\right )}{4}+\frac {\ln \left (c x +1\right )}{4}\right )}{c}\) \(211\)
derivativedivides \(\frac {a^{2} d \left (\frac {1}{2} c^{2} x^{2}+c x \right )+b^{2} d \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )^{2}}{2}+c x \operatorname {arctanh}\left (c x \right )^{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {3 \,\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )}{2}+\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )}{2}+\frac {\left (\ln \left (c x +1\right )-\ln \left (\frac {c x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c x}{2}+\frac {1}{2}\right )}{4}-\operatorname {dilog}\left (\frac {c x}{2}+\frac {1}{2}\right )-\frac {\ln \left (c x +1\right )^{2}}{8}+\frac {\ln \left (c x -1\right )}{2}+\frac {\ln \left (c x +1\right )}{2}-\frac {3 \ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{4}+\frac {3 \ln \left (c x -1\right )^{2}}{8}\right )+2 a b d \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )}{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {c x}{2}+\frac {3 \ln \left (c x -1\right )}{4}+\frac {\ln \left (c x +1\right )}{4}\right )}{c}\) \(213\)
default \(\frac {a^{2} d \left (\frac {1}{2} c^{2} x^{2}+c x \right )+b^{2} d \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )^{2}}{2}+c x \operatorname {arctanh}\left (c x \right )^{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {3 \,\operatorname {arctanh}\left (c x \right ) \ln \left (c x -1\right )}{2}+\frac {\operatorname {arctanh}\left (c x \right ) \ln \left (c x +1\right )}{2}+\frac {\left (\ln \left (c x +1\right )-\ln \left (\frac {c x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c x}{2}+\frac {1}{2}\right )}{4}-\operatorname {dilog}\left (\frac {c x}{2}+\frac {1}{2}\right )-\frac {\ln \left (c x +1\right )^{2}}{8}+\frac {\ln \left (c x -1\right )}{2}+\frac {\ln \left (c x +1\right )}{2}-\frac {3 \ln \left (c x -1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{4}+\frac {3 \ln \left (c x -1\right )^{2}}{8}\right )+2 a b d \left (\frac {c^{2} x^{2} \operatorname {arctanh}\left (c x \right )}{2}+c x \,\operatorname {arctanh}\left (c x \right )+\frac {c x}{2}+\frac {3 \ln \left (c x -1\right )}{4}+\frac {\ln \left (c x +1\right )}{4}\right )}{c}\) \(213\)
risch \(a^{2} d x +\frac {b \ln \left (-c x -1\right ) a d}{2 c}+a b d x +\frac {3 \ln \left (-c x +1\right ) a b d}{2 c}-\ln \left (-c x +1\right ) a b d x -\frac {b^{2} \ln \left (-c x +1\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right ) d}{c}+\frac {b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right ) d}{c}-\frac {3 a^{2} d}{2 c}+\frac {b^{2} \operatorname {dilog}\left (-\frac {c x}{2}+\frac {1}{2}\right ) d}{c}+\frac {\ln \left (-c x +1\right )^{2} b^{2} d x}{4}-\frac {\ln \left (-c x +1\right ) b^{2} d x}{2}-\frac {3 \ln \left (-c x +1\right )^{2} b^{2} d}{8 c}+\frac {\ln \left (-c x +1\right ) b^{2} d}{2 c}-\frac {a b d}{c}-\frac {d c \ln \left (-c x +1\right ) a b \,x^{2}}{2}+\frac {d c \,x^{2} a^{2}}{2}+\frac {b^{2} d \ln \left (-c x -1\right )}{2 c}+\left (-\frac {d \,b^{2} x \left (c x +2\right ) \ln \left (-c x +1\right )}{4}+\frac {b d \left (2 a \,c^{2} x^{2}+4 c x a +2 b c x +3 b \ln \left (-c x +1\right )\right )}{4 c}\right ) \ln \left (c x +1\right )+\frac {d c \ln \left (-c x +1\right )^{2} b^{2} x^{2}}{8}+\frac {b^{2} d \left (c^{2} x^{2}+2 c x +1\right ) \ln \left (c x +1\right )^{2}}{8 c}\) \(352\)

input
int((c*d*x+d)*(a+b*arctanh(c*x))^2,x,method=_RETURNVERBOSE)
 
output
a^2*d*(1/2*c*x^2+x)+b^2*d/c*(1/2*c^2*x^2*arctanh(c*x)^2+c*x*arctanh(c*x)^2 
+c*x*arctanh(c*x)+3/2*arctanh(c*x)*ln(c*x-1)+1/2*arctanh(c*x)*ln(c*x+1)+1/ 
4*(ln(c*x+1)-ln(1/2*c*x+1/2))*ln(-1/2*c*x+1/2)-dilog(1/2*c*x+1/2)-1/8*ln(c 
*x+1)^2+1/2*ln(c*x-1)+1/2*ln(c*x+1)-3/4*ln(c*x-1)*ln(1/2*c*x+1/2)+3/8*ln(c 
*x-1)^2)+2*a*b*d/c*(1/2*c^2*x^2*arctanh(c*x)+c*x*arctanh(c*x)+1/2*c*x+3/4* 
ln(c*x-1)+1/4*ln(c*x+1))
 
3.1.71.5 Fricas [F]

\[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=\int { {\left (c d x + d\right )} {\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2} \,d x } \]

input
integrate((c*d*x+d)*(a+b*arctanh(c*x))^2,x, algorithm="fricas")
 
output
integral(a^2*c*d*x + a^2*d + (b^2*c*d*x + b^2*d)*arctanh(c*x)^2 + 2*(a*b*c 
*d*x + a*b*d)*arctanh(c*x), x)
 
3.1.71.6 Sympy [F]

\[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=d \left (\int a^{2}\, dx + \int b^{2} \operatorname {atanh}^{2}{\left (c x \right )}\, dx + \int 2 a b \operatorname {atanh}{\left (c x \right )}\, dx + \int a^{2} c x\, dx + \int b^{2} c x \operatorname {atanh}^{2}{\left (c x \right )}\, dx + \int 2 a b c x \operatorname {atanh}{\left (c x \right )}\, dx\right ) \]

input
integrate((c*d*x+d)*(a+b*atanh(c*x))**2,x)
 
output
d*(Integral(a**2, x) + Integral(b**2*atanh(c*x)**2, x) + Integral(2*a*b*at 
anh(c*x), x) + Integral(a**2*c*x, x) + Integral(b**2*c*x*atanh(c*x)**2, x) 
 + Integral(2*a*b*c*x*atanh(c*x), x))
 
3.1.71.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 290 vs. \(2 (105) = 210\).

Time = 0.35 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.59 \[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=\frac {1}{2} \, a^{2} c d x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} a b c d + a^{2} d x + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} a b d}{c} + \frac {{\left (\log \left (c x + 1\right ) \log \left (-\frac {1}{2} \, c x + \frac {1}{2}\right ) + {\rm Li}_2\left (\frac {1}{2} \, c x + \frac {1}{2}\right )\right )} b^{2} d}{c} + \frac {b^{2} d \log \left (c x + 1\right )}{2 \, c} + \frac {b^{2} d \log \left (c x - 1\right )}{2 \, c} + \frac {4 \, b^{2} c d x \log \left (c x + 1\right ) + {\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x + b^{2} d\right )} \log \left (c x + 1\right )^{2} + {\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x - 3 \, b^{2} d\right )} \log \left (-c x + 1\right )^{2} - 2 \, {\left (2 \, b^{2} c d x + {\left (b^{2} c^{2} d x^{2} + 2 \, b^{2} c d x + b^{2} d\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{8 \, c} \]

input
integrate((c*d*x+d)*(a+b*arctanh(c*x))^2,x, algorithm="maxima")
 
output
1/2*a^2*c*d*x^2 + 1/2*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 
+ log(c*x - 1)/c^3))*a*b*c*d + a^2*d*x + (2*c*x*arctanh(c*x) + log(-c^2*x^ 
2 + 1))*a*b*d/c + (log(c*x + 1)*log(-1/2*c*x + 1/2) + dilog(1/2*c*x + 1/2) 
)*b^2*d/c + 1/2*b^2*d*log(c*x + 1)/c + 1/2*b^2*d*log(c*x - 1)/c + 1/8*(4*b 
^2*c*d*x*log(c*x + 1) + (b^2*c^2*d*x^2 + 2*b^2*c*d*x + b^2*d)*log(c*x + 1) 
^2 + (b^2*c^2*d*x^2 + 2*b^2*c*d*x - 3*b^2*d)*log(-c*x + 1)^2 - 2*(2*b^2*c* 
d*x + (b^2*c^2*d*x^2 + 2*b^2*c*d*x + b^2*d)*log(c*x + 1))*log(-c*x + 1))/c
 
3.1.71.8 Giac [F]

\[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=\int { {\left (c d x + d\right )} {\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2} \,d x } \]

input
integrate((c*d*x+d)*(a+b*arctanh(c*x))^2,x, algorithm="giac")
 
output
integrate((c*d*x + d)*(b*arctanh(c*x) + a)^2, x)
 
3.1.71.9 Mupad [F(-1)]

Timed out. \[ \int (d+c d x) (a+b \text {arctanh}(c x))^2 \, dx=\int {\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2\,\left (d+c\,d\,x\right ) \,d x \]

input
int((a + b*atanh(c*x))^2*(d + c*d*x),x)
 
output
int((a + b*atanh(c*x))^2*(d + c*d*x), x)